package product

import (
	"energy-amiot-platform/middleware"

	"github.com/gin-gonic/gin"
)

var (
	moduleCode = 4
)

func Routers(r *gin.Engine) {
	// 需管理员平台界面面配置
	group1 := r.Group("/product", middleware.AuthToken())
	group1.POST("", create)
	group1.GET("", pagingQuery)
	group1.GET(":id", findByKey)
	group1.DELETE(":id", deleteByKey)

	// 给界面选取框填充数据
	group2 := r.Group("/fui/product", middleware.AuthToken())
	group2.GET("", pagingQueryForFui)
}
